package Thread;

import java.util.Timer;
import java.util.TimerTask;

public class Demo18 {
    public static void main(String[] args) {
        Timer timer = new Timer();

        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("复制完成,运行完毕");
            }
        },3000);

        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("完成覆写,开始准备模块复制");
            }
        },2000);

        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("覆写预载完成,开始准备覆写");
            }
        },1000);

        System.out.println("开始预载覆写模块");
    }
}
